using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._StandardFeatureAnalysisTools._UseProximity
{
    /// <summary>
    /// <para>Create Buffers</para>
    /// <para>Creates polygons that cover a given distance from a point, line, or polygon feature.</para>
    /// <para>创建覆盖距点、线或面要素的给定距离的面。</para>
    /// </summary>    
    [DisplayName("Create Buffers")]
    public class CreateBuffers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateBuffers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputLayer">
        /// <para>Input Layer</para>
        /// <para>The point, line, or polygon features to be buffered.</para>
        /// <para>要缓冲的点、线或面要素。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// </param>
        public CreateBuffers(object _inputLayer, object _outputName)
        {
            this._inputLayer = _inputLayer;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Standard Feature Analysis Tools";

        public override string ToolName => "Create Buffers";

        public override string CallName => "sfa.CreateBuffers";

        public override List<string> AcceptEnvironments => ["extent"];

        public override object[] ParameterInfo => [_inputLayer, _outputName, _distances, _field, _units.GetGPValue(), _dissolveType.GetGPValue(), _ringType.GetGPValue(), _sideType.GetGPValue(), _endType.GetGPValue(), _output];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The point, line, or polygon features to be buffered.</para>
        /// <para>要缓冲的点、线或面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputLayer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Distances</para>
        /// <para>A list of distance values to buffer the input features. You must supply values for either the distances or a distance field. You can enter a single distance value or multiple values. The units of the distance values is supplied by the distance units.</para>
        /// <para>用于缓冲输入要素的距离值列表。必须提供距离或距离字段的值。您可以输入单个距离值或多个值。距离值的单位由距离单位提供。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _distances { get; set; } = null;


        /// <summary>
        /// <para>Distance Field</para>
        /// <para>A field from the input layer containing one buffer distance per feature.</para>
        /// <para>输入图层中的字段，包含每个要素的一个缓冲区距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field { get; set; } = null;


        /// <summary>
        /// <para>Distance Units</para>
        /// <para><xdoc>
        ///   <para>The units of the buffer distance. You must provide a value if cell size has been set.</para>
        ///   <bulletList>
        ///     <bullet_item>Miles—Miles</bullet_item><para/>
        ///     <bullet_item>Feet—Feet</bullet_item><para/>
        ///     <bullet_item>Kilometers—Kilometers</bullet_item><para/>
        ///     <bullet_item>Meters—Meters</bullet_item><para/>
        ///     <bullet_item>Nautical miles—Nautical miles</bullet_item><para/>
        ///     <bullet_item>Yards—Yards</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>缓冲距离的单位。如果已设置单元格大小，则必须提供一个值。</para>
        ///   <bulletList>
        ///     <bullet_item>英里 - 英里</bullet_item><para/>
        ///     <bullet_item>英尺 - 英尺</bullet_item><para/>
        ///     <bullet_item>公里 - 公里</bullet_item><para/>
        ///     <bullet_item>米 - 米</bullet_item><para/>
        ///     <bullet_item>海里 - 海里</bullet_item><para/>
        ///     <bullet_item>码 - 码</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _units_value _units { get; set; } = _units_value._METERS;

        public enum _units_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para>Meters—Meters</para>
            /// <para>米 - 米</para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para>Kilometers—Kilometers</para>
            /// <para>公里 - 公里</para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Feet</para>
            /// <para>Feet—Feet</para>
            /// <para>英尺 - 英尺</para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("FEET")]
            _FEET,

            /// <summary>
            /// <para>Miles</para>
            /// <para>Miles—Miles</para>
            /// <para>英里 - 英里</para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Nautical miles</para>
            /// <para>Nautical miles—Nautical miles</para>
            /// <para>海里 - 海里</para>
            /// </summary>
            [Description("Nautical miles")]
            [GPEnumValue("NAUTICALMILES")]
            _NAUTICALMILES,

            /// <summary>
            /// <para>Yards</para>
            /// <para>Yards—Yards</para>
            /// <para>码 - 码</para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("YARDS")]
            _YARDS,

        }

        /// <summary>
        /// <para>Dissolve Type</para>
        /// <para><xdoc>
        ///   <para>Determines how overlapping buffers are processed.</para>
        ///   <bulletList>
        ///     <bullet_item>No dissolve— Overlapping areas are kept. This is the default.</bullet_item><para/>
        ///     <bullet_item>Dissolve overlapping areas— Overlapping areas are combined.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定如何处理重叠缓冲区。</para>
        ///   <bulletList>
        ///     <bullet_item>不溶解 - 保留重叠区域。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>溶解重叠区域 - 合并重叠区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolveType_value _dissolveType { get; set; } = _dissolveType_value._NONE;

        public enum _dissolveType_value
        {
            /// <summary>
            /// <para>No dissolve</para>
            /// <para>No dissolve— Overlapping areas are kept. This is the default.</para>
            /// <para>不溶解 - 保留重叠区域。这是默认设置。</para>
            /// </summary>
            [Description("No dissolve")]
            [GPEnumValue("NONE")]
            _NONE,

            /// <summary>
            /// <para>Dissolve overlapping areas</para>
            /// <para>Dissolve overlapping areas— Overlapping areas are combined.</para>
            /// <para>溶解重叠区域 - 合并重叠区域。</para>
            /// </summary>
            [Description("Dissolve overlapping areas")]
            [GPEnumValue("DISSOLVE")]
            _DISSOLVE,

        }

        /// <summary>
        /// <para>Buffer Ring Type</para>
        /// <para><xdoc>
        ///   <para>Determines how multiple-distance buffers are processed.</para>
        ///   <bulletList>
        ///     <bullet_item>Concentric overlapping disks— Buffers are concentric and will overlap. For example, if your distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 0 to 14. This is the default.</bullet_item><para/>
        ///     <bullet_item>Nonoverlapping rings— Buffers will not overlap. For example, if your distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 10 to 14.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定如何处理多距离缓冲区。</para>
        ///   <bulletList>
        ///     <bullet_item>同心重叠圆盘 - 缓冲区是同心的，将重叠。例如，如果距离为 10 和 14，则结果将是两个缓冲区，一个从 0 到 10，一个从 0 到 14。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>非重叠环 — 缓冲区不会重叠。例如，如果距离为 10 和 14，则结果将是两个缓冲区，一个从 0 到 10，一个从 10 到 14。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Buffer Ring Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _ringType_value _ringType { get; set; } = _ringType_value._DISKS;

        public enum _ringType_value
        {
            /// <summary>
            /// <para>Concentric overlapping disks</para>
            /// <para>Concentric overlapping disks— Buffers are concentric and will overlap. For example, if your distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 0 to 14. This is the default.</para>
            /// <para>同心重叠圆盘 - 缓冲区是同心的，将重叠。例如，如果距离为 10 和 14，则结果将是两个缓冲区，一个从 0 到 10，一个从 0 到 14。这是默认设置。</para>
            /// </summary>
            [Description("Concentric overlapping disks")]
            [GPEnumValue("DISKS")]
            _DISKS,

            /// <summary>
            /// <para>Nonoverlapping rings</para>
            /// <para>Nonoverlapping rings— Buffers will not overlap. For example, if your distances are 10 and 14, the result will be two buffers, one from 0 to 10 and one from 10 to 14.</para>
            /// <para>非重叠环 — 缓冲区不会重叠。例如，如果距离为 10 和 14，则结果将是两个缓冲区，一个从 0 到 10，一个从 10 到 14。</para>
            /// </summary>
            [Description("Nonoverlapping rings")]
            [GPEnumValue("RINGS")]
            _RINGS,

        }

        /// <summary>
        /// <para>Side Type</para>
        /// <para><xdoc>
        ///   <para>When buffering line features, you can choose which side of the line to buffer. Typically, you choose both sides (Full, which is the default). Left and right are determined as if you were walking from the first x,y coordinate of the line (the start coordinate) to the last x,y coordinate of the line (the end coordinate). Choosing left or right usually means you know that your line features were created and stored in a particular direction (for example, upstream or downstream in a river network).</para>
        ///   <para>When buffering polygon features, you can choose whether the buffer includes or excludes the polygon being buffered.</para>
        ///   <para>If a side type is not supplied, the polygon being buffered is included in the result buffer. This is the default for polygon features.</para>
        ///   <bulletList>
        ///     <bullet_item>Full— Both sides of the line will be buffered. This is the default for line features.</bullet_item><para/>
        ///     <bullet_item>Right— Only the right side of the line will be buffered.</bullet_item><para/>
        ///     <bullet_item>Left— Only the right side of the line will be buffered.</bullet_item><para/>
        ///     <bullet_item>Outside— When buffering a polygon, the polygon being buffered is excluded in the result buffer.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>缓冲线要素时，可以选择要缓冲线的哪一侧。通常，您可以选择两端（“完整”，这是默认值）。确定“左”和“右”时，就像从直线的第一个 x，y 坐标（起始坐标）走到直线的最后一个 x，y 坐标（结束坐标）一样。选择向左或向右通常意味着您知道您的线要素是在特定方向（例如，河流网络的上游或下游）创建和存储的。</para>
        ///   <para>缓冲面要素时，可以选择缓冲区是包含还是排除要缓冲的面。</para>
        ///   <para>如果未提供边类型，则正在缓冲的面将包含在结果缓冲区中。这是面要素的默认设置。</para>
        ///   <bulletList>
        ///     <bullet_item>Full— 线的两边都将被缓冲。这是线要素的默认设置。</bullet_item><para/>
        ///     <bullet_item>右 — 仅缓冲线的右侧。</bullet_item><para/>
        ///     <bullet_item>左 — 仅缓冲线的右侧。</bullet_item><para/>
        ///     <bullet_item>外部 - 缓冲面时，被缓冲的面将排除在结果缓冲区中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Side Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sideType_value? _sideType { get; set; } = null;

        public enum _sideType_value
        {
            /// <summary>
            /// <para>Full</para>
            /// <para>Full— Both sides of the line will be buffered. This is the default for line features.</para>
            /// <para>Full— 线的两边都将被缓冲。这是线要素的默认设置。</para>
            /// </summary>
            [Description("Full")]
            [GPEnumValue("FULL")]
            _FULL,

            /// <summary>
            /// <para>Right</para>
            /// <para>Right— Only the right side of the line will be buffered.</para>
            /// <para>右 — 仅缓冲线的右侧。</para>
            /// </summary>
            [Description("Right")]
            [GPEnumValue("RIGHT")]
            _RIGHT,

            /// <summary>
            /// <para>Left</para>
            /// <para>Left— Only the right side of the line will be buffered.</para>
            /// <para>左 — 仅缓冲线的右侧。</para>
            /// </summary>
            [Description("Left")]
            [GPEnumValue("LEFT")]
            _LEFT,

            /// <summary>
            /// <para>Outside</para>
            /// <para>Outside— When buffering a polygon, the polygon being buffered is excluded in the result buffer.</para>
            /// <para>外部 - 缓冲面时，被缓冲的面将排除在结果缓冲区中。</para>
            /// </summary>
            [Description("Outside")]
            [GPEnumValue("OUTSIDE")]
            _OUTSIDE,

        }

        /// <summary>
        /// <para>End Type</para>
        /// <para><xdoc>
        ///   <para>The shape of the buffer at the end-of-line input features. This parameter is not valid for polygon input features. At the ends of lines, the buffer can be rounded (round) or be straight across (flat).</para>
        ///   <bulletList>
        ///     <bullet_item>Round ends— Buffers will be rounded at the ends of lines. This is the default.</bullet_item><para/>
        ///     <bullet_item>Flat ends— Buffers will be flat or straight across at the ends of lines.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>行尾输入特征处缓冲区的形状。此参数对面输入要素无效。在行的末端，缓冲区可以是倒圆角（圆形）或直线（平坦）。</para>
        ///   <bulletList>
        ///     <bullet_item>倒圆角两端 - 缓冲区将在行尾倒圆角。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>平端 - 缓冲区将在线的末端为平整或笔直横。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("End Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _endType_value _endType { get; set; } = _endType_value._ROUND;

        public enum _endType_value
        {
            /// <summary>
            /// <para>Round ends</para>
            /// <para>Round ends— Buffers will be rounded at the ends of lines. This is the default.</para>
            /// <para>倒圆角两端 - 缓冲区将在行尾倒圆角。这是默认设置。</para>
            /// </summary>
            [Description("Round ends")]
            [GPEnumValue("ROUND")]
            _ROUND,

            /// <summary>
            /// <para>Flat ends</para>
            /// <para>Flat ends— Buffers will be flat or straight across at the ends of lines.</para>
            /// <para>平端 - 缓冲区将在线的末端为平整或笔直横。</para>
            /// </summary>
            [Description("Flat ends")]
            [GPEnumValue("FLAT")]
            _FLAT,

        }

        /// <summary>
        /// <para>Output</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        public CreateBuffers SetEnv(object extent = null)
        {
            base.SetEnv(extent: extent);
            return this;
        }

    }

}